/**
 * @Date 2023-02-04 15:00:20
 * @Remark
 */

// API -------------------------------------------------------------

export const API_USER_PAGE: Api = {
  title: "用户分页",
  path: "user/list",
  method: "POST",
  remark: "用户管理",
};

export interface ReqUserPage extends ReqPage {
  phoneNumber?: string;
  // identityId?: string;
  // userName?: string;
  // mobile?: string;
  // identityNumber?: string;
  // startDate?: string;
  // endDate?: string;
  // teamId?: string;
  // nickName?: string;
  // isTeam?: number; // 是否加入团队（0已加入团队 1未加入团队）
}

// API -------------------------------------------------------------

export const API_REMARK_UPDATE: Api = {
  title: "编辑用户备注",
  path: "wx_user/remark_Wx_User",
  method: "POST",
  remark: "用户管理",
};

// req
export interface ReqRemarkUpdate {
  id: string;
  remark: string;
}
// API -------------------------------------------------------------

export const API_USER_DETAIL: Api = {
  title: "用户详情",
  path: "admin_app_user/detailed",
  method: "POST",
  remark: "app用户",
};

// API -------------------------------------------------------------

export const API_USER_ADD: Api = {
  title: "添加用户",
  path: "admin_app_user/add",
  method: "POST",
  remark: "app用户",
};

// req
export interface ReqUserAdd {
  identityId: number;
  identityNumber: string;
  mobile: string;
  pass: string;
  userName: string;
  verificationCode: string;
}

// API -------------------------------------------------------------

export const API_USER_CODE: Api = {
  title: "发送手机号验证码",
  path: "admin_app_user/send_mobile_code",
  method: "POST",
  remark: "app用户",
};

// req
export interface ReqUserCode {
  mobile: string;
}

// API -------------------------------------------------------------

export const API_USER_UPDATE: Api = {
  title: "编辑用户",
  path: "",
  method: "POST",
  remark: "app用户",
};

// req
export interface ReqUserUpdate extends ReqById, ReqUserAdd {}

// API -------------------------------------------------------------

export const API_USER_DEL: Api = {
  title: "删除用户",
  path: "",
  method: "POST",
  remark: "app用户",
};

// req
export interface ReqUserDel {
  permId: string;
}

// API -------------------------------------------------------------

export const API_USER_STATUS: Api = {
  title: "用户起禁用",
  path: "admin_app_user/disable",
  method: "POST",
  remark: "app用户",
};

// req
export interface ReqUserStatus {
  id: string;
  statusEnum: string;
}

// API -------------------------------------------------------------

export const API_USER_UPDATE_ID: Api = {
  title: "修改用户ID",
  path: "admin_app_user/update_identity_id",
  method: "POST",
  remark: "app用户",
};

// req
export interface ReqUserUpdateId {
  id: string;
  identityId: number | string;
}
